package demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.Serializable;

@Component
public class Worker implements Serializable {


    private String name = "强子";
    @Autowired
    public Tool tool;

    public void work(){
        System.out.printf(name+"使用"+tool);

    }



}
